import http from "../utils/http/service";
// ----------------------------项目管理相关--------------------------------------------

// 获取项目树结构数据
export const postProjectTree = (data): any => {
  return http.post("/snow-admin/projectManage/projectTree", data);
};

// 查询项目管理列表
export const postProjectMngList = (data): any => {
  return http.post("/snow-admin/projectManage/projectMngList", data);
};

// 新增项目
export const postAddProject = (data): any => {
  return http.post("/snow-admin/projectManage/add", data);
};

// 新增合同
export const postAddContract = (data): any => {
  return http.post("/snow-admin/projectContract/add", data);
};

// 合同列表
export const postProContractList = (data): any => {
  return http.post("/snow-admin/projectContract/proContractList", data);
};

// 删除项目
export const postProjectDelete = (data): any => {
  return http.post("/snow-admin/projectManage/delete", data);
};

// 删除合同
export const postProjectContractDelete = (data): any => {
  return http.post("/snow-admin/projectContract/delete", data);
};

// 编辑项目
export const postProjectManageUpdate = (data): any => {
  return http.post("/snow-admin/projectManage/update", data);
};

//删除项目
export const postProjectManageDelete = (data): any => {
  return http.post("/snow-admin/thdProjectManage/delete ", data);
};

//判断是否为超管
export const judgeRole = (): any => {
  return http.post("/snow-admin/sysRole/judRole ", {});
};

// 编辑合同
export const postProjectContractUpdate = (data): any => {
  return http.post("/snow-admin/projectContract/update", data);
};

// 项目组管理
export const postProTeamMembePrsSave = (data): any => {
  return http.post("/snow-admin/projectContract/proTeamMembersSave", data);
};

// 项目组成员获取
export const getProTeamMembers = (data): any => {
  return http.get(`/snow-admin/projectContract/proTeamMembers/${data.id}`);
};
